Trò chơi đua xe động vật trong UNITY Engine
114.775 lượt xem;
- InterpolationExpOut.cs
- Interpolations /
- Bapk /
- Scripts /
- Assets /
- project /
1 using UnityEngine;
2 using System.Collections;
3
4 public class InterpolationExpOut : InterpolationExp {
5
6 public InterpolationExpOut(float value, float power) : base(value, power)
7 {
8 }
9
10 public override float apply(float a)
11 {
12 return 1 - (Mathf.Pow(value, -power * a) - min) * scale;
13 }
14
15 }
2 using System.Collections;
3
4 public class InterpolationExpOut : InterpolationExp {
5
6 public InterpolationExpOut(float value, float power) : base(value, power)
7 {
8 }
9
10 public override float apply(float a)
11 {
12 return 1 - (Mathf.Pow(value, -power * a) - min) * scale;
13 }
14
15 }